/*******************************************************************************
* Copyright (c) 2010, 2018 西安秦晔信息科技有限公司
* Licensed under the Apache License, Version 2.0 (the "License");
*    you may not use this file except in compliance with the License.
*    You may obtain a copy of the License at
*
*       http://www.apache.org/licenses/LICENSE-2.0
*
*    Unless required by applicable law or agreed to in writing, software
*    distributed under the License is distributed on an "AS IS" BASIS,
*    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*    See the License for the specific language governing permissions and
*    limitations under the License.
*******************************************************************************/
package com.qinyeit.serviceapp.entity;

import lombok.Builder;
import lombok.experimental.Tolerate;

import javax.persistence.*;

/**
 * ClassName: StoreInOrderDetail <br/>
 * Function: 入库单据明细 <br/>
 * date: 2018-11-08 14:01:30 <br/>
 *
 * @author liuwenjin
 * @version  1.0
 * @since JDK 1.8
 */
@Builder
@Entity
@Table(name="store_in_order_details")
public class StoreInOrderDetail extends MerchantGroupBaseEntity<Long> {

	private static final long serialVersionUID = 1L;


	// 订单id
	@ManyToOne
	@JoinColumn(name="order_id")
	private StoreInOrder order = null;


	// 规格id 采购规格id
    @Column(name="spec_id")
	private Long specId = null;

	// 物料id
	@Column(name="material_id")
	private Long materialId = null;

	// 物品编号 
    @Column(name="no", length = 300)
	private String no = null;

	// 物品名称 
    @Column(name="name", length = 300)
	private String name = null;

	// 物品规格 
    @Column(name="spec", length = 300)
	private String spec = null;

	// 物品单位 库存单位
    @Column(name="unit", length = 300)
	private String unit = null;

	// 采购规格型号 name
	@Column(name="purchase_spec", length = 300)
	private String purchaseSpec = null;

	// 采购规格单位
	@Column(name="purchase_unit", length = 300)
	private String purchaseUnit = null;


	// 采购数量 
    @Column(name="count",scale=2)
	private Double count = null;

	// 采购单价 
    @Column(name="price",scale=2)
	private Double price = null;

	// 采购金额 
    @Column(name="total",scale=2)
	private Double total = null;

	// 入库单位 
    @Column(name="storage_unit", length = 300)
	private String storageUnit = null;

	// 入库数量 
    @Column(name="storage_count",scale=2)
	private Double storageCount = null;

	// 入库单价 
    @Column(name="storage_price",scale=2)
	private Double storagePrice = null;

	// 入库金额 
    @Column(name="storage_total",scale=2)
	private Double storageTotal = null;
	// 物品条码
	@Column(name="code", length = 300)
	private String code = null;

    @Tolerate
	public StoreInOrderDetail() {
		
	}
    @Tolerate
	public StoreInOrderDetail(Long id){
    	super.setId(id);
    }

	public StoreInOrder getOrder() {
		return order;
	}

	public void setOrder(StoreInOrder order) {
		this.order = order;
	}

	public Long getSpecId() {
		return specId;
	}

	public void setSpecId(Long specId) {
		this.specId = specId;
	}

	/**
	 * 获取物品编号
	 */
	public String getNo() {
		return this.no;
	}

    /**
     * 设置物品编号
     */
	public StoreInOrderDetail setNo(String no) {
		this.no = no;
		return this;
	}

	/**
	 * 获取物品名称
	 */
	public String getName() {
		return this.name;
	}

    /**
     * 设置物品名称
     */
	public StoreInOrderDetail setName(String name) {
		this.name = name;
		return this;
	}

	/**
	 * 获取物品规格
	 */
	public String getSpec() {
		return this.spec;
	}

    /**
     * 设置物品规格
     */
	public StoreInOrderDetail setSpec(String spec) {
		this.spec = spec;
		return this;
	}

	/**
	 * 获取物品单位
	 */
	public String getUnit() {
		return this.unit;
	}

    /**
     * 设置物品单位
     */
	public StoreInOrderDetail setUnit(String unit) {
		this.unit = unit;
		return this;
	}

	/**
	 * 获取采购数量
	 */
	public Double getCount() {
		return this.count;
	}

    /**
     * 设置采购数量
     */
	public StoreInOrderDetail setCount(Double count) {
		this.count = count;
		return this;
	}

	/**
	 * 获取采购单价
	 */
	public Double getPrice() {
		return this.price;
	}

    /**
     * 设置采购单价
     */
	public StoreInOrderDetail setPrice(Double price) {
		this.price = price;
		return this;
	}

	/**
	 * 获取采购金额
	 */
	public Double getTotal() {
		return this.total;
	}

    /**
     * 设置采购金额
     */
	public StoreInOrderDetail setTotal(Double total) {
		this.total = total;
		return this;
	}

	/**
	 * 获取入库单位
	 */
	public String getStorageUnit() {
		return this.storageUnit;
	}

    /**
     * 设置入库单位
     */
	public StoreInOrderDetail setStorageUnit(String storageUnit) {
		this.storageUnit = storageUnit;
		return this;
	}

	/**
	 * 获取入库数量
	 */
	public Double getStorageCount() {
		return this.storageCount;
	}

    /**
     * 设置入库数量
     */
	public StoreInOrderDetail setStorageCount(Double storageCount) {
		this.storageCount = storageCount;
		return this;
	}

	/**
	 * 获取入库单价
	 */
	public Double getStoragePrice() {
		return this.storagePrice;
	}

    /**
     * 设置入库单价
     */
	public StoreInOrderDetail setStoragePrice(Double storagePrice) {
		this.storagePrice = storagePrice;
		return this;
	}

	/**
	 * 获取入库金额
	 */
	public Double getStorageTotal() {
		return this.storageTotal;
	}

    /**
     * 设置入库金额
     */
	public StoreInOrderDetail setStorageTotal(Double storageTotal) {
		this.storageTotal = storageTotal;
		return this;
	}

	public String getPurchaseSpec() {
		return purchaseSpec;
	}

	public void setPurchaseSpec(String purchaseSpec) {
		this.purchaseSpec = purchaseSpec;
	}

	public String getPurchaseUnit() {
		return purchaseUnit;
	}

	public void setPurchaseUnit(String purchaseUnit) {
		this.purchaseUnit = purchaseUnit;
	}

	public Long getMaterialId() {
		return materialId;
	}

	public void setMaterialId(Long materialId) {
		this.materialId = materialId;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
}
